package com.bdqn.service;

import com.bdqn.mapper.FloorMapper;
import com.bdqn.pojo.Floor;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class FloorServiceImpl implements FloorService {
    @Resource
    private FloorMapper floorMapper;

    /**
     * 分页查询楼层
     * @param queryMap
     * @return
     */
    @Override
    public List<Floor> getList(Map<String, Object> queryMap) {
        return floorMapper.getList(queryMap);
    }

    /**
     * 模糊查询楼层总条数
     * @param qyeryMap
     * @return
     */
    @Override
    public List<Floor> getTotal(Map<String, Object> qyeryMap) {
        return floorMapper.getTotal(qyeryMap);
    }

    @Override
    public int add(Floor floor) {
        return floorMapper.add(floor);
    }

    @Override
    public int edit(Floor floor) {
        return floorMapper.edit(floor);
    }

    @Override
    public int delete(Long id) {
        return floorMapper.delete(id);
    }

    @Override
    public List<Floor> findAll() {
        return floorMapper.findAll();
    }
}
